package com.peihongli.dao;

import com.peihongli.pojo.Product;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProductMapper {
    @Select("SELECT * FROM tb_product WHERE id IN (SELECT product_id FROM tb_ordersitem WHERE orders_id=#{id})")
    List<Product> selectProductByOrdersId(int orders_id);
}
